<template>
  <view>
    <z-paging
      ref="paging"
      v-model="itemList"
      @query="queryList"
      :fixed="true"
      :auto="false"
      :auto-show-back-to-top="true"
      :empty-view-img="`${getImageUrl('empty.png')} `"
      empty-view-text="暂无数据~"
      :empty-view-img-style="imgStyle"
    >
      <view solt="top">
        <u-navbar title="点餐订单" height="50" title-size="36"></u-navbar>
      </view>
      <view class="" style="padding: 20rpx">
        <view class="order-box" v-for="(item, index) in itemList" :key="index">
          <view class="store-box dis-flex flex-y-center flex-y-between">
            <view class="store-l dis-flex flex-y-center">
              <u-image border-radius="50%" src="" width="60rpx" height="60rpx"></u-image>
              <view class="store-l-des">
                <view class="store-tl">店铺昵称店铺昵称</view>
                <view class="date">2024-10-25 17:45:56</view>
              </view>
            </view>
            <view class="order-stat">待付款</view>
          </view>
          <u-line></u-line>
          <scroll-view
            scroll-x="true"
            class="image-list"
            style="width: 100%"
            :show-scrollbar="false"
            :enhanced="true"
          >
            <view class="goods-item">
              <u-image
                class="goods-image"
                @click="on"
                width="160"
                height="160"
                src=""
                border-radius="8"
              ></u-image>
              <view class="goods-name oneline-hide">产品昵称产昵称产</view>
            </view>
            <view class="goods-item">
              <u-image
                class="goods-image"
                @click="on"
                width="160"
                height="160"
                src=""
                border-radius="8"
              ></u-image>
              <view class="goods-name oneline-hide">产品昵称产昵称产</view>
            </view>
            <view class="goods-item">
              <u-image
                class="goods-image"
                @click="on"
                width="160"
                height="160"
                src=""
                border-radius="8"
              ></u-image>
              <view class="goods-name oneline-hide">产品昵称产昵称产</view>
            </view>
            <view class="goods-item">
              <u-image
                class="goods-image"
                @click="on"
                width="160"
                height="160"
                src=""
                border-radius="8"
              ></u-image>
              <view class="goods-name oneline-hide">产品昵称产昵称产</view>
            </view>
            <view class="goods-item">
              <u-image
                class="goods-image"
                @click="on"
                width="160"
                height="160"
                src=""
                border-radius="8"
              ></u-image>
              <view class="goods-name oneline-hide">产品昵称产昵称产</view>
            </view>
          </scroll-view>
          <u-line></u-line>
          <view class="count dis-flex flex-y-between">
            <view style="font-size: 22rpx">共8件</view>
            <view class="" style="font-size: 28rpx">
              <text>合计:</text>
              <text style="color: #fa453c; margin-left: 10rpx">¥88.58</text>
            </view>
          </view>
          <u-line></u-line>
          <view class="bt-group dis-flex flex-y-center flex-y-between">
            <view class="zhuo">轩雅阁8号桌</view>
            <view class="bt-list dis-flex flex-y-center">
              <view class="bt">取消订单</view>
              <view class="bt bt-c">立即支付</view>
            </view>
          </view>
        </view>
      </view>
    </z-paging>
  </view>
</template>

<script>
export default {
  data() {
    return {
      show: false,
      imgStyle: {
        width: '12rem'
      },
      itemList: []
    }
  },
  onLoad() {
    this.queryList(1)
  },
  methods: {
    queryList(pageNo = 1, pageSize = 10) {
      this.itemList = [{}, {}, {}]
    },
    onCancel() {
      this.show = true
    }
  }
}
</script>

<style scoped lang="scss">
page {
  padding: 30rpx 20rpx;
}

.order-box {
  position: relative;
  background-color: #fff;
  padding: 20rpx 20rpx;
  margin-bottom: 20rpx;
  border-radius: 10rpx;

  .store-box {
    margin-bottom: 20rpx;

    .store-l {
      .store-l-des {
        margin-left: 20rpx;

        .store-tl {
          font-size: 30rpx;
        }

        .date {
          font-size: 24rpx;
          color: #999999;
          margin-top: 4rpx;
        }
      }
    }

    .order-stat {
      font-size: 28rpx;
      color: #666666;
    }
  }

  .image-list {
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    margin-top: 20rpx;
    margin-bottom: 10rpx;

    .goods-item {
      display: inline-block;
      width: 160rpx;
      margin-right: 20rpx;

      .goods-name {
        font-size: 26rpx;
        color: #333333;
        margin-top: 10rpx;
      }
    }

    .goods-item:last-child {
      margin: 0;
    }
  }

  .count {
    margin: 30rpx 0;
  }

  .bt-group {
    margin-top: 30rpx;
    margin-bottom: 10rpx;

    .zhuo {
      font-size: 28rpx;
      color: #333333;
    }

    .bt-list {
      .bt {
        width: 150rpx;
        height: 60rpx;
        border-radius: 30rpx;
        border: 1px solid #e6e6e6;
        line-height: 60rpx;
        text-align: center;
        font-size: 28rpx;
        color: #666666;
        margin-left: 20rpx;
      }

      .bt-c {
        background: #10a28f;
        color: #ffffff;
        border: none;
      }
    }
  }
}
</style>
